#include <stdio.h>

#define AGE(left, right) (((left) + (right)) / 2)

int bisearch (int arr[], int n, int F) {
    int left = 0;
    int right = n - 1;
    while (left <= right) {
        if (arr[AGE(left, right)] < F) {
            left = AGE(left, right) + 1;
        } else if (arr[AGE(left, right)] > F) {
            right = AGE(left, right) - 1;
        } else if (arr[AGE(left, right)] == F) {
            return AGE(left, right);
        } else {
            return -1;
        }
    }
    return -1;
}

int main()
{
    int arr[3][3] = {1, 2, 3, 3, 4, 5, 5, 6, 8};
    int F = 0;
    int R = 0;
    int C = -1;
    int row = 0;
    int col = 0;
    scanf("%d%d", &row, &col);
    scanf("%d", &F);
    //查找每一行
    for (R = 0; R < row; R++) {
        //二分法查找
        C = bisearch(&arr[R][0], col, F);
        if (C != -1) {
            printf("(%d, %d)", R, C);
            break;
        } else if (R == row - 1) {
            printf("没有找到!");
        }
    }
    return 0;
}